{% init show_path_list = False %}
{% init error = None %}
{% init group_type = None %}
{% init op = "view" %}
{% init is_iframe = False %}

{% set item = file %}
{% set type_dict = dict(
    md = "Markdown",
    gallery = "相册",
    html = "富文本",
    csv = "表格",
    list = "清单"
) %}

{% if show_path_list %}
    <div class="grid-title">
        {% include note/component/pathlist.html %}

        {% if file != None and file.id == 0 %}
            <a class="btn float-right" href="/note/management?parent_id=0">整理</a>
        {% end %}

        {% if group_type == "gallery" %}
            <div class="float-right"><a class="btn" href="/note/add?type=gallery">创建相册</a></div>
        {% elif group_type == "list" %}
            <div class="float-right"><a class="btn" href="/note/add?type=list">创建清单</a></div>
        {% else %}
            {# 其他普通笔记 #}
            <div class="float-right">
                {% include note/component/note_dropdown.html %}
            </div>
        {% end %}
    </div>
{% end %}

{% if error != "" and error != None%}
    <div class="col-md-12 error">
        {{error}}
    </div>
{% end %}
